<?php
	global $_W,$_GPC;
	if($_W['role']&&$_W['isajax']){
		$index = array('title'=>$_GPC['indextitle']);
		$service = array('listtitle'=>$_GPC['servicelisttitle'],'detailstitle'=>$_GPC['servicedetailstitle']);
		$tech = array("listtitle"=>$_GPC['techlisttitle'],"detailstitle"=>$_GPC['techdetailstitle']);
		$personal = array("title"=>$_GPC['personaltitle']);
		$about = array("title"=>$_GPC['abouttitle']);
		$card  = array("title"=>$_GPC['cardtitle']);
		$mybook = array("title"=>$_GPC['mybooktitle']);
		$book = array("title"=>$_GPC['booktitle'],"book_Tname"=>$_GPC['book_Tname'],"book_Tphone"=>$_GPC['book_Tphone'],
			"book_Taddress"=>$_GPC['book_Taddress'],"book_Tservice"=>$_GPC['book_Tservice'],"book_Ttech"=>$_GPC['book_Ttech'],"book_Tdate"=>$_GPC['book_Tdate'],"book_Tcard"=>$_GPC['book_Tcard'],"book_hideaddress"=>$_GPC['book_hideaddress'],"book_hidecard"=>$_GPC['book_hidecard']);
		$insdata = array("uniacid"=>$_W['uniacid'],'index'=>serialize($index),'service'=>serialize($service),'tech'=>serialize($tech),'personal'=>serialize($personal),'about'=>serialize($about),'card'=>serialize($card),'mybook'=>serialize($mybook),'book'=>serialize($book));
		include_once MODULE_ROOT.'/mii/class/mii.class.php';
		$miiclass = new miiclass();
		$miiclass->build_array_php($index,'indexPage','/public/pageinfo/',$_W['uniacid']);
		$miiclass->build_array_php($service,'servicePage','/public/pageinfo/',$_W['uniacid']);
		$miiclass->build_array_php($tech,'techPage','/public/pageinfo/',$_W['uniacid']);
		$miiclass->build_array_php($personal,'personalPage','/public/pageinfo/',$_W['uniacid']);
		$miiclass->build_array_php($about,'aboutPage','/public/pageinfo/',$_W['uniacid']);
		$miiclass->build_array_php($card,'cardPage','/public/pageinfo/',$_W['uniacid']);
		$miiclass->build_array_php($mybook,'mybookPage','/public/pageinfo/',$_W['uniacid']);
		$miiclass->build_array_php($book,'bookPage','/public/pageinfo/',$_W['uniacid']);		
		$v = pdo_get('mii_ang_pageinfo',array('uniacid'=>$_W['uniacid']),array('id'));
		if($v['id']){
			$res = pdo_update('mii_ang_pageinfo',$insdata,array('uniacid'=>$_W['uniacid']));
			if($res){
				exit(json_encode(array('status'=>'1','msg'=>'保存成功')));
			}else{
				exit(json_encode(array('status'=>'2','msg'=>'没有发生变化')));
			}
		}else{
			$res = pdo_insert('mii_ang_pageinfo',$insdata);
			if($res){
				exit(json_encode(array('status'=>'1','msg'=>'保存成功')));
			}else{
				exit(json_encode(array('status'=>'2','msg'=>'保存失败')));
			}
		}
		
	}else{	
		exit(json_encode(array('status'=>'2','msg'=>'没有操作权限')));
	}



?>